<?php
//рус
include_once(_CORE_PATH. 'router/router_protocol_prototype.php');
class router_std extends router_protocol_prototype
{
	public function Create($elements = array())
	{
		$elements = (array)$elements;
		
		$params = '';
		foreach ($elements as $pName => $pValue)
		{
			$params .= '"' .addcslashes($pName. '=' .$pValue, '"'). '" ';
		}
		$params = trim($params);
		
		$filePath = _ROOT_PATH. 'index.php';
		$filePath = '"' .addcslashes($filePath, '"'). '"';
		
		return 'php ' .$filePath.(strlen($params) ? ' ' .$params : '');		
	}
	
	public function Route()
	{
		$request = SysLoader::GetRequest('std');
		return array($request->get('module'), $request->get('ctrl'), $request->get('action'));
	}	
}